package com.sxpi.zixun.service.state;

import com.sxpi.zixun.mapper.StateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

/**
 * @Author: 董伟豪
 * @Date: 2022/9/18 12:42
 */
@Service
public class IStateServiceImpl implements IStateService{

    @Autowired
    private StateMapper stateMapper;

    /**
     * 统计订单和用户相关
     * @return
     */
    @Override
    public Map<String, Object> countIndexData() {
        return stateMapper.countIndexData();
    }

    /**
     * 统计操作系统
     * @return
     */
    @Override
    public List<Map<String, Object>> stateOS(String condition) {
        return stateMapper.stateOS(condition);
    }

    /**
     * 统计浏览器
     * @return
     */
    @Override
    public List<Map<String, Object>> stateRequestBrower(String condition) {
        return stateMapper.stateRequestBorwer(condition);
    }

    /**
     * 统计性别
     * @return
     */
    @Override
    public List<Map<String, Object>> stateUserSex(String condition) {
        return stateMapper.stateUserSex(condition);
    }

    /**
     * 根据条件查询订单统计信息
     * @param dateCondition
     * @return
     */
    @Override
    public List<Map<String, Object>> stateOrderRealtion(String dateCondition) {
        return stateMapper.stateOrderRelation(dateCondition);
    }
}
